<?php
/**
 * Created by PhpStorm.
 * User: u
 * Date: 2018/12/25
 * Time: 16:25
 */
namespace common\sources\write\valueservice;

use Yii;
use common\models\craftsman\ValueService;

class ValueServiceAccess implements IValueServiceAccess
{
    public function addValueService($data)
    {
        return Yii::$app->db->createCommand()->insert('value_service', [
            'return_type' => $data['return_type'],
            'return_type' => $data['return_type_pepper'],
            'interval_time' => $data['interval_time'],
            'interval_pepper' => $data['interval_pepper'],
            'pub_timing' => $data['pub_timing'],
            'pub_timing_pepper' => $data['pub_timing_pepper'],
            'end_timing' => $data['end_timing'],
            'end_timing_pepper' => $data['end_timing_pepper'],
            'chat_type' => $data['chat_type'],
            'chat_keys' => $data['chat_keys'],
            'exten_period' => $data['exten_period'],
            'buy_sex' => $data['buy_sex'],
            'praise' => $data['praise'],
            'praise_keys' => $data['praise_keys'],
            'prohibit' => $data['prohibit'],
            'buy_age' => $data['buy_age'],
            'up_rank' => $data['up_rank'],
            'reword_commise' => $data['reword_commise'],
            'prio_audit' => $data['prio_audit'],
            'expre_service' => $data['expre_service'],
            'weight' => $data['weight'],
            'bus_id' => $data['bus_id'],
            'task_commod_id' => $data['task_commod_id'],
            'task_id' => $data['task_id'],
            'create_time' => time()
        ])->execute();
    }
}